package com.jhm.internet1;

import java.net.InetAddress;
import java.net.UnknownHostException;

public class MyInternetDemo1 {
    public static void main(String[] args) throws UnknownHostException {
        //我的本机电脑对象
        InetAddress address = InetAddress.getByName("127.0.0.1");
        System.out.println(address);
        System.out.println(address.getHostAddress());
        System.out.println(address.getHostName());

    }
}
